Digital camera providing high dynamic range images

ABSTRACT

A method for producing a high-dynamic-range image, comprising receiving a low-resolution image of the scene having a first resolution and captured at a first exposure level; receiving a high-resolution image of a scene having a second resolution and captured at a second exposure level different from the first exposure level, the second resolution being greater than the first resolution; forming a representative low-resolution image from the high-resolution image; forming a residual image corresponding to differences between the high-resolution image and the representative low-resolution image; forming a low-resolution high-dynamic range image by combining the low-resolution image and the representative low-resolution image; producing the high-dynamic-range image by combining the low-resolution high dynamic range image and the residual image; and storing the high-dynamic-range image in a processor accessible memory.

CROSS REFERENCE RELATED APPLICATION

Reference is made to commonly assigned, U.S. patent application Ser. No.12/644,039 (Docket 95945), filed Dec. 22, 2009, by Wayne E. Prentice, etal., entitled “Creating an Image Using Still and Preview”, and tocommonly assigned, U.S. patent application Ser. No. ______ (Docket96601), filed ______, by Efrain Morales., entitled “Method for producinghigh dynamic range images,” both of which are incorporated herein byreference.

FIELD OF THE INVENTION

The invention pertains to generating an improved image by combiningmultiple images, and more specifically to a method for producing a highresolution image having increased dynamic range.

BACKGROUND OF THE INVENTION

Image sensing devices, such as charge-coupled devices (CCDs), arecommonly found in such products as digital cameras, scanners, and videocameras. These image sensing devices have a very limited dynamic rangewhen compared to traditional negative film products. A typical imagesensing device has a dynamic range of about 5 stops. As a consequence,the exposure level for a typical scene must be determined with a fairamount of accuracy in order to avoid clipping the signal. As definedherein, exposure level is the total amount of light allowed to fall onan image sensing device during the process of sensing a scene to producean image. When sensing a scene under fixed illumination with an imagingsystem with an optical path that has a fixed aperture, the exposurelevel is controlled by setting the imaging system's exposure time(shutter speed). When sensing a scene with fixed illumination with animaging system with an optical path that has a variable aperture, theexposure level is controlled by setting the imaging system's exposuretime and aperture.

Often times the scene has a very wide dynamic range as a result ofmultiple illuminants (e.g., front-lit and back-lit portions of a scene).In the case of a wide dynamic range scene, choosing an appropriateexposure for the subject often necessitates clipping data in anotherpart of the image. The narrower dynamic range of an image sensing devicerelative to a scene therefore results in lesser image quality for imagesobtained by an image sensing device.

Methods to increase the dynamic range of images acquired by an imagesensing device would allow such images to be rebalanced to achieve amore pleasing rendition of the image. Also, images with high dynamicrange would allow for more pleasing contrast improvements, such asdescribed by Lee et al. in commonly assigned U.S. Pat. No. 5,012,333,entitled “Interactive dynamic range adjustment system for printingdigital images.”

One method used for obtaining improved images with an image sensingdevice is exposure bracketing, whereby multiple still images of the sameresolution are captured at a range of different exposure levels, and oneof the images is selected as having a best overall exposure level. Thistechnique, however, does not increase the dynamic range of anyindividual image captured by the image sensing device. As definedherein, the term resolution is used to refer to the number of pixels inan image.

One method for obtaining an image with a high dynamic range is bycapturing multiple still images of the same resolution having differentexposure levels, and then combining the images into a single outputimage having increased dynamic range. This approach is describedcommonly assigned U.S. Pat. No. 5,828,793 to Mann, entitled “Method andapparatus for producing digital images having extended dynamic ranges,”and by commonly assigned U.S. Pat. No. 6,040,858 to Ikeda, “Method andapparatus for expanding the dynamic range of sensed color images.” Thisapproach often requires a separate capture mode and processing path in adigital camera. Additionally, the temporal proximity of the multiplecaptures is limited by the rate at which the images can be read out fromthe image sensor. Greater temporal disparity among captures increasesthe likelihood of motion existing among the captures, whether cameramotion related to hand jitter, or scene motion resulting from objectsmoving within the scene. Motion increases the difficulty in mergingmultiple images into a single output image.

Another method for obtaining an image with high dynamic range whichaddresses the issue of motion existing among multiple images is thesimultaneous capture of multiple images having different exposurelevels. The images are subsequently combined into a single output imagehaving increased dynamic range. This capture process can be achievedthrough the use of multiple imaging paths and sensors. However, thissolution incurs extra cost due to the multiple imaging paths andsensors. It also introduces a correspondence problem among the multipleimages, as the sensors are not co-located and thus generate imageshaving different perspectives. Alternatively, a beam-splitter can beused to project incident light onto multiple sensors within a singleimage capture device. This solution incurs extra cost for thebeam-splitter and multiple sensors, and also reduces the amount of lightavailable to any individual image sensor thereby lessening the imagequality because of a decrease in signal-to-noise performance.

Another method for obtaining an image with high dynamic range is throughthe use of an image sensor having some pixels with a standard responseto light exposure and other pixels having a non-standard response tolight exposure. Such a solution is described in commonly assigned U.S.Pat. No. 6,909,461 to

Gallagher et al., entitled “Method and apparatus to extend the effectivedynamic range of an image sensing device.” Such a sensor has inferiorperformance, however, for scenes having a narrow dynamic range, as thepixels with a photographically slower, non-standard response have poorersignal-to-noise performance than pixels with a standard response.

Another method for obtaining an image with high dynamic range is throughthe use of an image sensor programmed to read out and store pixelswithin the image sensor at a first exposure level while continuing toexpose the image sensor to light. Such a solution is described incommonly assigned U.S. Pat. No. 7,616,256 to Ward et al., entitled“Multiple exposure methods and apparatus for electronic cameras.” In oneexample, pixels from a CCD are read into light-shielded verticalregisters after a first exposure level is achieved, and exposure of theimage sensor continues until a second exposure level is achieved. Whilethis solution allows multiple readouts of individual pixels from theimage sensor with minimal time between the exposures, it has thedrawback of requiring specialized hardware to read the data out from thesensor.

Therefore, a need in the art exists for an improved solution tocombining multiple images to form an image having high dynamic range,without requiring special hardware or additional image sensors, withoutsacrificing performance for scenes not requiring high dynamic range,without requiring a separate capture mode, and with minimal time betweenthe multiple exposures.

SUMMARY OF THE INVENTION

The present invention represents a method for producing ahigh-dynamic-range image, comprising:

a) receiving a low-resolution image of a scene having a first resolutionand captured at a first exposure level;

b) receiving a high-resolution image of the scene having a secondresolution and captured at a second exposure level different from thefirst exposure level, the second resolution being greater than the firstresolution;

c) using a data processor to form a representative low-resolution imagefrom the high-resolution image;

d) using a data processor to form a residual image corresponding todifferences between the high-resolution image and the representativelow-resolution image;

e) using a data processor to form a low-resolution high-dynamic rangeimage by combining the low-resolution image and the representativelow-resolution image;

f) using a data processor to produce the high-dynamic-range image bycombining the low-resolution high-dynamic-range image and the residualimage; and

g) storing the high-dynamic-range image in a processor accessiblememory.

An advantage of the present invention is that an image having highdynamic range can be produced without special hardware or additionalimage sensors.

A further advantage of the present invention is that an image havinghigh dynamic range can be produced without sacrificing performance forscenes not requiring high dynamic range.

A further advantage of the present invention is that an image havinghigh dynamic range can be produced without requiring a separate capturemode.

A still further advantage of the present invention is that an imagehaving high dynamic range can be produced with minimal time between themultiple exposures.

This and other aspects, objects, features, and advantages of the presentinvention will be more clearly understood and appreciated from a reviewof the following detailed description of the preferred embodiments andappended claims, and by reference to the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of a digital still camera system for use withthe processing methods of the current invention;

FIG. 2 is an illustration of a prior art Bayer color filter arraypattern on an image sensor;

FIG. 3A is a flow chart for an embodiment of the present invention;

FIG. 3B is a flow chart for an alternate embodiment of the presentinvention;

FIG. 4A is a flowchart of a method for combining live view and stillimages according to an embodiment the present invention;

FIG. 4B is a flowchart of a method for combining live view and stillimages according to an alternate embodiment the present invention;

FIG. 5 is a flowchart of a method for determining a correction factorimage according to an embodiment of the present invention;

FIG. 6A is a flowchart of a method for combining a still image and ahigh-resolution live view image according to an embodiment of thepresent invention;

FIG. 6B is a flow chart of a method for combining a live view image anda representative live view image according to an embodiment of thepresent invention; and

FIG. 7 is a flow chart of a method for combining a still image and anadjusted live view image according to an embodiment of the presentinvention.

DETAILED DESCRIPTION OF THE INVENTION

Because digital cameras employing imaging devices and related circuitryfor signal capture and correction and for exposure control are wellknown, the present description will be directed in particular toelements forming part of, or cooperating more directly with, a methodand apparatus in accordance with the present invention. Elements notspecifically shown or described herein are selected from those known inthe art. Certain aspects of the embodiments to be described are providedin software. Given the system as shown and described according to theinvention in the following materials, software not specifically shown,described or suggested herein that is useful for implementation of theinvention is conventional and within the ordinary skill in such arts.

Turning now to FIG. 1, a block diagram of an image capture device shownas a digital camera embodying the present invention is shown. Although adigital camera will now be explained, the present invention is clearlyapplicable to other types of image capture devices, such as imagingsub-systems included in non-camera devices such as mobile phones andautomotive vehicles, for example. Light 10 from the subject scene isinput to an imaging stage 11, where the light is focused by lens 12 toform an image on solid-state image sensor 20. Image sensor 20 convertsthe incident light to an electrical signal by integrating charge foreach picture element (pixel). The image sensor 20 of the preferredembodiment is a charge coupled device (CCD) type or an active pixelsensor (APS) type. (APS devices are often referred to as CMOS sensorsbecause of the ability to fabricate them in a Complementary Metal OxideSemiconductor process). The sensor includes an arrangement of colorfilters, as described in more detail subsequently. The amount of lightreaching the image sensor 20 is regulated by an iris 14 that varies anaperture and a filter block 13 that can include one or more ND filtersinterposed in the optical path. Also regulating the overall light levelis the time that a shutter 18 is open. An exposure controller 40responds to the amount of light available in the scene as metered by abrightness sensor 16 and controls all three of these regulatingfunctions.

An analog signal from the image sensor 20 is processed by analog signalprocessor 22 and applied to analog-to-digital (A/D) converter 24 fordigitizing the analog sensor signals. Timing generator 26 producesvarious clocking signals to select rows and pixels and synchronizes theoperation of analog signal processor 22 and AID converter 24. Imagesensor stage 28 includes the image sensor 20, the analog signalprocessor 22, the AID converter 24, and the timing generator 26. Thefunctional elements of the image sensor stage 28 can be separatelyfabricated integrated circuits, or they can be fabricated as a singleintegrated circuit as is commonly done with CMOS image sensors. Theresulting stream of digital pixel values from A/D converter 24 is storedin DSP memory 32 associated with a digital signal processor (DSP) 36.

DSP 36 is one of three processors or controllers in this embodiment, inaddition to a system controller 50 and the exposure controller 40.Although this distribution of camera functional control among multiplecontrollers and processors is typical, these controllers or processorscan be combinable in various ways without affecting the functionaloperation of the camera and the application of the present invention.These controllers or processors can comprise one or more digital signalprocessor devices, microcontrollers, programmable logic devices, orother digital logic circuits. Although a combination of such controllersor processors has been described, it should be apparent that onecontroller or processor is preferably designated to perform all of theneeded functions. All of these variations can perform the same functionand fall within the scope of this invention, and the term “processingstage” will be used as needed to encompass all of this functionalitywithin one phrase, for example, as in processing stage 38 in FIG. 1.

In the illustrated embodiment, DSP 36 manipulates the digital image datain its DSP memory 32 according to a software program permanently storedin program memory 54 and copied to DSP memory 32 for execution duringimage capture. DSP 36 executes the software needed for practicing imageprocessing shown in FIGS. 3A and 3B. DSP memory 32 includes any type ofrandom access memory, such as SDRAM. A bus 30 comprising a pathway foraddress and data signals connects DSP 36 to its related DSP memory 32,A/D converter 24 and other related devices.

The system controller 50 controls the overall operation of the camerabased on a software program stored in program memory 54, which caninclude Flash EEPROM or other nonvolatile memory. This memory can alsobe used to store image sensor calibration data, user setting selectionsand other data which must be preserved when the camera is turned offSystem controller 50 controls the sequence of image capture by directingexposure controller 40 to operate the lens 12, the filter block 13, iris14, and shutter 18 as previously described, directing the timinggenerator 26 to operate the image sensor 20 and associated elements, anddirecting DSP 36 to process the captured image data. After an image iscaptured and processed, the final image file stored in DSP memory 32 istransferred to a host computer via host interface 57, stored on aremovable memory card 64 or other storage device, and displayed for theuser on image display 88.

A bus 52 includes a pathway for address, data and control signals, andconnects system controller 50 to DSP 36, program memory 54, systemmemory 56, host interface 57, memory card interface 60 and other relateddevices. Host interface 57 provides a high-speed connection to apersonal computer (PC) or other host computer for transfer of image datafor display, storage, manipulation or printing. This interface is anIEEE1394 or USB2.0 serial interface or any other suitable digitalinterface. Memory card 64 is typically a Secure Digital (SD) cardinserted into socket 62 and connected to the system controller 50 viamemory card interface 60. Other types of storage that are used includewithout limitation PC-Cards, MultiMedia Cards (MMC), or Compact Flash(CF) cards.

Processed images are copied to a display buffer in system memory 56 andcontinuously read out via video encoder 80 to produce a video signal.This signal is output directly from the camera for display on anexternal monitor, or processed by display controller 82 and presented onimage display 88. This display is typically an active matrix colorliquid crystal display (LCD), although other types of displays are usedas well.

The user interface 68, including all or any combination of viewfinderdisplay 70, exposure display 72, status display 76 and image display 88,and user inputs 74, is controlled by a combination of software programsexecuted on exposure controller 40 and system controller 50. User inputs74 typically include some combination of buttons, rocker switches,joysticks, rotary dials or touch screens. Exposure controller 40operates light metering, exposure mode, autofocus and other exposurefunctions. The system controller 50 manages the graphical user interface(GUI) presented on one or more of the displays (e.g., on image display88). The GUI typically includes menus for making various optionselections and review modes for examining captured images.

Exposure controller 40 accepts user inputs selecting exposure mode, lensaperture, exposure time (shutter speed), and exposure index or ISO speedrating and directs the lens and shutter accordingly for subsequentcaptures. Brightness sensor 16 is employed to measure the brightness ofthe scene and provide an exposure meter function for the user to referto when manually setting the ISO speed rating (exposure index), apertureand shutter speed. In this case, as the user changes one or moresettings, the light meter indicator presented on viewfinder display 70can be configured to indicate to the user to what degree the image willbe overexposed or underexposed. In an automatic exposure mode, the userchanges one setting and the exposure controller 40 automatically altersanother setting to maintain correct exposure level. For example, for agiven ISO speed rating when the user reduces the lens aperture, theexposure controller 40 will automatically increase the exposure time tomaintain the same overall exposure level.

The ISO speed rating is an important attribute of a digital stillcamera. The exposure time, the lens aperture, the lens transmittance,the level and spectral distribution of the scene illumination, and thescene reflectance determine the exposure level of a digital stillcamera. When an image from a digital still camera is obtained using aninsufficient exposure level, proper tone reproduction can generally bemaintained by increasing the electronic or digital gain, but the imagewill contain an unacceptable amount of noise. As the exposure level isincreased, the gain is decreased, and therefore the image noise cannormally be reduced to an acceptable level. If the exposure level isincreased excessively, the resulting signal in bright areas of the imagecan exceed the maximum signal level capacity of the image sensor orcamera signal processing. This can cause image highlights to be clippedto form a uniformly bright area, or to bloom into surrounding areas ofthe image. It is important to guide the user in setting proper exposurelevels. An ISO speed rating is intended to serve as such a guide. Inorder to be easily understood by photographers, the ISO speed rating fora digital still camera should directly relate to the ISO speed ratingfor photographic film cameras. For example, if a digital still camerahas an ISO speed rating of ISO 200, then the same exposure time andaperture should be appropriate for an ISO 200 rated film/process system.

The ISO speed ratings are intended to harmonize with film ISO speedratings. However, there are differences between electronic andfilm-based imaging systems that preclude exact equivalency. Digitalstill cameras can include variable gain, and can provide digitalprocessing after the image data has been captured, enabling tonereproduction to be achieved over a range of camera exposure levels.Because of this flexibility, digital still cameras can have a range ofspeed ratings. This range is defined as the ISO speed latitude. Toprevent confusion, a single value is designated as the inherent ISOspeed rating, with the ISO speed latitude upper and lower limitsindicating the speed range, that is, a range including effective speedratings that differ from the inherent ISO speed rating. With this inmind, the inherent ISO speed is a numerical value calculated from theexposure level provided at the focal plane of a digital still camera toproduce specified camera output signal characteristics. The inherentspeed is usually the exposure index value that produces peak imagequality for a given camera system for normal scenes, where the exposureindex is a numerical value that is inversely proportional to theexposure level provided to the image sensor.

The foregoing description of a digital camera will be familiar to oneskilled in the art. It will be obvious that there are many variations ofthis embodiment that can be selected to reduce the cost, add features,or improve the performance of the camera. For example, an autofocussystem could be added, or the lens is detachable and interchangeable. Itwill be understood that the present invention is applied to any type ofdigital camera or, more generally, digital image capture apparatus,where alternative modules provide similar functionality.

Given the illustrative example of FIG. 1, the following description willthen describe in detail the operation of this camera for capturingimages according to the present invention. Whenever general reference ismade to an image sensor in the following description, it is understoodto be representative of the image sensor 20 from FIG. 1. Image sensor 20shown in FIG. 1 typically includes a two-dimensional array of lightsensitive pixels fabricated on a silicon substrate that convert incominglight at each pixel into an electrical signal that is measured. In thecontext of an image sensor, a pixel refers to a discrete light sensingarea and charge shifting or charge measurement circuitry associated withthe light sensing area. In the context of a digital color image, theterm pixel commonly refers to a particular location in the image havingassociated color values. The term color pixel will refer to a pixelhaving a color photoresponse over a relatively narrow spectral band. Theterms exposure duration and exposure time are used interchangeably.

As image sensor 20 is exposed to light, free electrons are generated andcaptured within the electronic structure at each pixel. Capturing thesefree electrons for some period of time and then measuring the number ofelectrons captured, or measuring the rate at which free electrons aregenerated, can measure the light level at each pixel. In the formercase, accumulated charge is shifted out of the array of pixels to acharge-to-voltage measurement circuit as in a charge-coupled device(CCD), or the area close to each pixel can contain elements of acharge-to-voltage measurement circuit as in an active pixel sensor (APSor CMOS sensor).

In order to produce a color image, the array of pixels in an imagesensor typically has a pattern of color filters placed over them. FIG. 2shows a color filter array (CFA) pattern 90 of red (R), green (G), andblue (B) color filters that is commonly used. This particular pattern iscommonly known as a Bayer color filter array (CFA) after its inventorBryce Bayer as disclosed in U.S. Pat. No. 3,971,065. This pattern iseffectively used in image sensors having a two-dimensional array ofcolor pixels. As a result, each pixel has a particular colorphotoresponse that, in this case, is a predominant sensitivity to red,green or blue light. Another useful variety of color photoresponses is apredominant sensitivity to magenta, yellow, or cyan light. In each case,the particular color photoresponse has high sensitivity to certainportions of the visible spectrum, while simultaneously having lowsensitivity to other portions of the visible spectrum.

An image captured using an image sensor 20 having a two-dimensionalarray with the CFA pattern 90 of FIG. 2 has only one color value at eachpixel.

In order to produce a full color image, there are a number of techniquesfor inferring or interpolating the missing colors at each pixel. TheseCFA interpolation techniques are well known in the art and reference ismade to the following patents: U.S. Pat. No. 5,506,619, U.S. Pat. No.5,629,734, and U.S. Pat. No. 5,652,621 for representative examples.

FIG. 3A illustrates a flow diagram according to an embodiment of thepresent invention. In push camera button to S1 step 310, the operatorbegins the image acquisition process by pushing a capture button on thedigital camera from the S0 position (undepressed position) to the S1position (partially depressed position) thereby sending apartially-depressed-capture-button signal to the system controller 50 inthe digital camera, as the operator composes the image. The systemcontroller 50 then instructs the camera to begin acquiring live viewimages 325 using a capture live view images step 320. The captured liveview images 325 are displayed to the operator on image display 88 to aidin the composition of the image. One or more of the captured live viewimages 325 are also stored into DSP memory 32 for later use. Generally,the captured live view images 325 have a reduced spatial resolutionrelative to the full sensor resolution. The reduced spatial resolutionis obtained by using only a portion of the pixels in the image sensor20, or by combining the signals from multiple pixels. It should be notedthat at the same time, the system controller 50 in the camera would alsotypically complete autofocus and autoexposure operations.

When the moment of acquisition is identified by the operator, theoperator pushes the capture button from the S1 position to an S2position (fully depressed position) thereby sending afully-depressed-capture-button signal to the system controller 50 in thecamera, as shown in push capture button to S2 step 330. At this point,in capture still image step 340, the system controller 50 instructs thedigital camera to stop continuous acquisition or capture of the liveview images 325 and to initiate the capture of a still image 345 havinga spatial resolution greater than the spatial resolution of the capturedlive view images 325. The exposure level used to capture the still image345 is set to a different level than the exposure level used to capturethe live view images 325 in order to provide information that can beused to extend the dynamic range. The different exposure level caneither be greater than or less than the exposure level of the capturedlive view images 325.

In combine images step 350 one or more of the captured live view images325 and the captured still image 345 are combined to form a high dynamicrange image 355 having greater dynamic range than the original capturedstill image. Finally, in render to output space step 360, the improvedstill image is rendered to an output color space producing rendered highdynamic range image 365 and is stored in a digital image file in aprocessor-accessible memory, for example on memory card 64.

The live view images 325 acquired in capture live view images step 320are from a live view image stream, such as is typically displayed on theimage display 88. The live view images 325 of such a live view imagestream are typically captured and displayed at 30 frames per second at aspatial resolution of 320 columns by 240 rows (QVGA resolution), or at640 columns by 480 rows (VGA resolution). This spatial resolution is notlimiting, however, and the live view images 325 can be captured at agreater spatial resolution. The live view images 325 can also bedisplayed at a greater spatial resolution. The maximum frequency atwhich the live view images 325 can be captured and read out from thesensor is inversely proportional to the spatial resolution of the liveview images 325.

Each live view image 325 acquired in capture live view images step 320is initially captured with a certain effective exposure level. As usedherein, effective exposure level is defined as the scaled exposure levelfor a given image, wherein the scaling is done by multiplying theexposure level by any binning factor used when reading out the imagedata from the sensor. For example, an image sensor using an exposurelevel E for a live view image 325, along with a binning factor of 9,generates an effective exposure level of 9E for the live view image 325.In this context, binning refers to the accumulation of charge fromneighboring pixels prior to read-out, and the binning factor refers tohow many pixels have their charge accumulated into a single value whichis read out. Binning typically occurs by accumulating charge from likepixels within the CFA pattern on the image sensor. For example, in FIG.2, a binning factor of 4 could be achieved by accumulating the chargefrom all 4 red pixels shown in the illustration to form a single redpixel, and by similarly accumulating charge for blue pixels and forgreen pixels. Note that there are twice as many green pixels as blue orred in a Bayer pattern, and they would be accumulated in two independentgroups to form two separate binned pixels.

The still image 345 captured in capture still image step 340 is ofgreater spatial resolution than the live view images 325 acquired duringcapture live view images step 320. Often, the still image 345 has thefull spatial resolution of the image sensor 20. The still image 345 iscaptured at an effective exposure level that is different than theeffective exposure level corresponding to the live view image 325. Thedifference in effective exposure level allows the subsequent generationof the high dynamic range image 355.

The acquisition of live view images 325 can also occur when the capturebutton is not in the S1 position. For example, live view images 325 canbe captured when the shutter button is in the S0 position. Theacquisition of live view images 325 can also continue through atransition from the S0 to S1 shutter button positions, or through atransition from S1 to S2 shutter button positions.

Each acquired live view image 325 has an effective exposure level thatis different from the effective exposure level of the still image 345.In one embodiment of the present invention, the acquired live viewimages 325 have effective exposure levels that are less than theeffective exposure level of the still image 345. In this scenario, thestill image 345 can contain pixels that are clipped from over-exposureto light, while the corresponding pixels in the live view images 325 arenot clipped. The live view images 325 with lesser effective exposurelevels can therefore provide additional information to extend thedynamic range of the still image 345. It is noted that a pixel valueincreases with increasing scene luminance to a point at which the pixelvalue no longer increases, but stays the same. This point is referred toas the clipped value. When a pixel is at the clipped value, it is saidto be clipped.

In another embodiment of the present invention, the acquired live viewimages 325 have effective exposure levels that are greater than theeffective exposure level of the still image 345. In this scenario, thestill image 345 can contain regions that are dark and have a lowsignal-to-noise ratio. These dark regions can be brightened by applyinga digital gain factor to those pixel values, or by applying a tonescaling operation that brings out details in the shadows, but thisincreases the noise along with the signal. The live view images 325 withgreater effective exposure levels can be used to provide additionalinformation with reduced noise in these dark image regions, therebyextending the dynamic range of the image. The improved signal-to-noiseperformance in the dark regions allows these regions to be lightenedwith less risk of objectionable noise.

There is no constraint that all of the live view images 325 need to becaptured using the same effective exposure level. In another embodimentof the present invention, at least one acquired live view image has aneffective exposure level that is lesser than the effective exposurelevel of the still image 345, and at least one acquired live view image325 has an effective exposure level that is greater than the effectiveexposure of the still image 345. In this scenario, it is possible toimprove the quality of the still image 345 in both dark image regionsand clipped image regions using the additional information provided inthe live view images 325.

When using multiple images to generate an image with high dynamic range,it is preferable that the multiple images capture the same scene. Toachieve this, the multiple images can be acquired with as littletemporal disparity among the images as possible. This minimizes thepotential for any changes in the scene that result from events such ascamera motion, object motion, or lighting changes. In general, the liveview image stream produces a continuous stream of live view images 325,followed by the capture of a still image 345. In order to minimize thetemporal disparity between the acquired live view images 325 and thestill image 345, the most recently captured live view images 325 fromthe live view image stream can be acquired and stored, continuouslyreplacing older live view images 325.

In the case that live view images 325 with multiple different effectiveexposure levels are acquired and stored, it is necessary to vary theeffective exposure levels of the images in the live view image stream.One method for acquiring live view images 325 having two effectiveexposure levels is to capture live view images having alternatingeffective exposure levels. Such a strategy always guarantees that whenthe still image 345 is captured, the two most recently captured liveview images 325 include one having the first effective exposure level,and the other having the second effective exposure level. The drawbackof such a strategy is that it can be difficult to display live viewimages 325 having alternating effective exposure levels on the back ofthe camera without visual artifacts. In some cases, however, the liveview images 325 can be captured at a rate exceeding the rate at whichlive view images 325 are displayed on the back of the camera. Forexample, if live view images 325 are captured at 60 frames per second,and displayed on the back of the camera at 30 frames per second, it isonly necessary to have live view images 325 corresponding to a singleeffective exposure level used for display on the back of the camera,eliminating the concern of visual artifacts.

FIG. 3B illustrates an alternate method for acquiring live view images325 having different effective exposure levels. In capture button to S1step 310, the operator begins the image acquisition process by pushingthe capture button on the camera from the S0 position (undepressedposition) to the S1 position (partially depressed position) therebysending a partially-depressed-capture-button signal to the systemcontroller 50 in the camera, as the operator composes the image. Thesystem controller 50 then instructs the camera to begin acquiring andstoring live view images 325 using capture live view images step 320,using available DSP memory 32. The acquired live view images 325 cancorrespond to a single effective exposure level. When the moment ofacquisition is identified by the operator, the operator pushes thecapture button from the Si position to the S2 position (fully depressedposition) thereby sending a fully-depressed-capture-button signal to thesystem controller 50 in the camera, as shown in push capture button toS2 step 330. At this point, in capture additional live view images step335, the system controller 50 instructs the camera to capture at leastone additional live view image 325 at a different effective exposurelevel than previously acquired. After the one or more additional liveview images 325 are captured, the system controller 50 instructs thecamera in capture still image step 340 to stop continuous acquisition ofthe live view images and to initiate the capture of a still image 345having a spatial resolution greater than the live view images 325. Incombine images step 350 the captured live view images 325 having thedifferent effective exposure levels and the captured still image 345 arecombined to form an improved still image having greater dynamic rangethan the original captured still image 345. Finally, in render to outputspace step 360, the improved still image is rendered to an output spaceand the resulting high dynamic range image 355 is stored in a digitalimage file in a processor-accessible memory, for example on memory card64.

By delaying the capture of a live view image 325 having the secondeffective exposure level until after the user has pushed the capturebutton from the S1 position to the S2 position, the live view images 325captured prior to the push capture button to S2 step 330 can bedisplayed on the back of the camera without concern for visual artifactsresulting from varying the effective exposure level of the live viewimages 325.

In all cases, the live view images 325 can be captured automatically,without the user required to switch camera modes, or manually set theexposure level for the live view images 325.

FIG. 4A describes in more detail the combine images step 350 from FIG.3A and FIG. 3B. according to one embodiment of the present invention.The inputs to the combine images step 350 are one of the one or morelive view images 325 and the still image 345. Initially, the still image345 is reduced in resolution using reduce resolution step 410, producinga representative low-resolution image. In a preferred embodiment, therepresentative low-resolution image has the same resolution as the liveview image 325, and is therefore representative of an image that wouldhave been captured using the live view image stream. The reduceresolution step 410 can comprise pixel combining, decimation andcropping. In a preferred embodiment, the reduce resolution step 410 isdesigned to mimic the steps used by the camera to generate the live viewimage 325.

An example of a reduction of resolution is as follows for a 12 megapixelBayer pattern image sensor having 4032 columns×3034 rows. The stillimage 345 is reduced to generate a 1312×506 representativelow-resolution image having the same resolution as the live view image325 generated while the camera button is pressed to the S1 position. The4032 columns×3034 rows are digitally combined by a factor of 3× in eachdimension to produce the representative low-resolution image. This canbe achieved by combining the pixel values of corresponding Bayer patternpixel locations. Nine blue pixel values are combined to generate onecombined blue pixel value. Similarly nine red pixel values are combinedto generate one combined red pixel value. Nine green pixels values onthe same rows as red pixels are combined to form a combined green pixelvalue. And nine green pixels on the same rows as blue pixels arecombined to form another combined green pixel value. The combined pixelvalues can be normalized by dividing the combined pixel value by thenumber of pixels contributing to the value. The combination step canalso discard some of the pixel values. For instance, only six of thenine pixel values can be used when forming the combined pixel value. Theresulting image has resolution 1342×1010 and retains a Bayer pattern. Toreduce the vertical resolution further by a factor of 2× whilemaintaining an image with Bayer pattern structure, every other pair ofrows is discarded. This results in a Bayer pattern image havingresolution 1342×506. Finally, 16 columns are cropped from the left ofthe image, and 14 columns are cropped from the right of the image togenerate an image with resolution 1312×506 corresponding to theresolution of a live view image 325.

The representative low-resolution image is subsequently spatiallyinterpolated back to the resolution of the original still image 345using an interpolate image step 415. The interpolate image step 415process generates a low-pass still image 420 having reducedhigh-frequency image content relative to the original still image 345.(In the case that some rows or columns of the original still image arecropped during the formation of the representative low-resolution image,the interpolation step only generates an interpolated image with thesame resolution as the cropped still image.) In a preferred embodiment,bicubic interpolation is used to generate the low-pass still image 420.Those skilled in the art will recognize, however, that there exist manysuitable interpolation techniques that can be used to generate thelow-pass still image 420.

In alternate embodiments, the low-pass still image 420 can be computedin a variety of different ways. For example, in some embodiments thelow-pass still image 420 can be formed by applying a low-passconvolution filter directly to the still image 345. Preferably, thelow-pass convolution filter should be designed such that the frequencycontent of the low-pass still image 420 is a simulation of the frequencycontent in the live view image 325.

A compute residual image step 425 is used to calculate a residual image430 representing a difference between the still image 345 and thelow-pass still image 420. In a preferred embodiment, the low-pass stillimage 420 is subtracted from the original still image 345 to generatethe residual image 430. If the original still image 345 and the low-passstill image 420 are of different sizes, the residual image 430 can bethe same size as the low-pass still image 420, and additional rows andcolumns from the original still image 345 can be ignored. Alternatively,the residual image 430 can be the same size as the original still image345, and the residual image 430 can have values equal to the originalstill image 345 at any locations outside the boundaries of the low-passstill image 420.

Those skilled in the art will recognize that there are other methods ofproducing a residual image appropriate for use according to the methodof the present invention. For example, the residual image 430 can becomputed directly from the still image 345 by applying an appropriatelydesigned high-pass convolution filter. Preferably, the high-passconvolution filter should be designed such that the frequency content ofthe residual image 430 is an estimate of the frequency content from thestill image 345 that is not included in the live view image 325 (and thelow-pass still image 420), and would be similar to the residual image430 that would be generated using the steps described above. In otherembodiments, wavelet transformation methods can be applied to producethe residual image 430.

An interpolate image step 435 is used to interpolate the live view image325 back to the resolution of the (possibly cropped) still image 345,producing one or more interpolated live view image 440. In a preferredembodiment, the interpolate image step 435 is identical to theinterpolate image step 415 described earlier.

In align images step 445, the interpolated live view image 440 isaligned with the low-pass still image 420 to account for motion that mayhave occurred between the two exposures, producing aligned live viewimage 450. In one method of motion image alignment, a global motioncompensation step is applied to align the two images. The global motioncompensation can include translation, rotation and scaling operations,or a combination thereof. Methods of global motion estimation andcompensation are well-known to those of skill in the art, and anysuitable method can be applied to align the interpolated live view image440 and the low-pass still image 420. In a preferred embodiment, in thecase that the images being aligned are CFA images, the motion estimationstep is restricted to translational motion of an integer multiple of theCFA pattern size, such as 2×2 in the case of a Bayer pattern, to ensurethat the motion-compensated images retain a Bayer pattern.

Local motion estimation and compensation can be used to replace orrefine the global motion estimate. Methods of local motion estimationand compensation are well-known to those of skill in the art, and anysuitable method can be applied to locally align the interpolated liveview and interpolated still images. In particular, block-based motionestimation algorithms can be used to determine motion estimates on localregions (blocks).

In determine correction factor image step 455, the image having a lesserexposure level (either aligned live view image 450 or low-pass stillimage 420) is used to determine the amounts of clipping present in theimage having a greater exposure level to produce a final correctionfactor image 460.

FIG. 5 illustrates additional details for the determine correctionfactor image step 455 according to an embodiment of the presentinvention. There are two cases to consider. A first case where the liveview image 325 was captured with an exposure level that is lower thanthe exposure level of the still image 345, and a second case where thelive view image 325 was captured with an exposure level that is higherthan the exposure level of the still image 345. A representation of theexposure level associated with each of the images can be determined bycomputing an average of the pixels values in the images. (For the stepsdescribed with respect to FIG. 5, it will be assumed that the codevalues are a linear exposure metric.) The mean pixel value for thelow-pass still image 420 will be given by E_(S), and the mean pixelvalue for the aligned live view image 450 will be given by E_(L). Anypixels that are clipped in either image are excluded when calculatingthe means.

An exposure test 510 compares the mean pixel values to identify theimage with the higher exposure. If E_(L)<E_(S), then the live view image325 was captured with a lower exposure level than the still image 345and execution proceeds to a still image clipped test 515. The stillimage clipped test 515 checks the pixels of the low-pass still image 420to see whether any of the pixels are clipped. If no clipped pixels aredetected, then a produce unity correction factor image step 585 is usedto produce a correction factor image 460 where all of the values are setto 1.0. If clipped pixels are detected, then a determine mean exposurefactor step 520 is executed.

For image data in a linear exposure metric, the mean value of the imagedata in the low-pass still image 420 will be approximately related by amultiplicative term to the mean value of the image data in the alignedlive view image 450 if flare is neglected. The multiplicative term,henceforth called MeanExposureFactor, may be obtained by dividing themean value of the pixel values for the low-pass still image (E_(S)) bythe mean value of the pixel values for the aligned live view image(E_(L)). The value of MeanExposureFactor will be greater than 1.0.

In determine gained live view image step 525, the aligned live viewimage 450 is multiplied by MeanExposureFactor, producing a gained liveview image. In a determined clipped gained live view image step 530, allpixel values of the gained live view image that are above the clippedvalue of the low-pass still image 420 are set to the clipped value,producing a clipped gained live view image. In a determined clipped liveview image step 535, the clipped gained live view image data is thendivided by MeanExposureFactor to produce a clipped live view image.

In a determine initial correction factor image step 540, each pixelvalue of the aligned live view image 450 is divided by the correspondingpixel value of the clipped live view image to produce an initialcorrection factor image, wherein the pixel values of the initialcorrection factor image are necessarily equal to or greater than one.Moreover, a pixel value of the initial correction factor image isgreater than one only on a spatial location where the clipped live viewimage has clipped pixels. The spatial locations where the clipped liveview image has clipped pixels are assumed to be the spatial locationswhere the low-pass still image 420 has clipped pixels. Therefore, theinitial correction factor image is an estimate of the image that isneeded to multiply by the low-pass still image 420 to obtain a versionof the low-pass still image without clipped pixels, and as such eachpixel in the initial correction image has a value that corresponds to anestimate of the amount of clipping in the low-pass still image 420 atthe corresponding spatial location.

However, it can be shown that the initial correction factor image pixelvalues are correct only on spatial locations that are away from theclipped pixels that represent object edges of a captured scene. Theinitial correction factor image pixels that represent clipped objectedges of a captured scene, or that are near pixels that representclipped object edges of a captured scene, will generally haveunderestimated pixel values. That is, the amount of clipping on or nearclipped edges is generally underestimated. In one preferred embodimentof the current invention, it is assumed that any pixels that did notexist before the interpolate image step 415 or the interpolate imagestep 435 correspond to underestimated amounts of clipping in the initialscale factor image. Furthermore, in the same embodiment, it is assumedthat all pixels that existed before the interpolate image step 415 orthe interpolate image step 435 correspond to correct amounts of clippingin the initial scale factor image.

A refine correction factor image step 545 is used to properly estimatean underestimated pixel value of the initial correction factor image.First, the underestimated pixel value is replaced by the maximum correctamount of clipping value within a neighborhood that contains theunderestimated pixel value. Once a pixel value of the initial correctionfactor image has been properly estimated, it is considered to correspondto a correct amount of clipping. All underestimated pixel values of theinitial correction factor image are similarly properly estimated toproduce an intermediate correction factor image. Next, the pixel valuesof the intermediate correction factor image that correspond to correctamounts of clipping in the initial scale factor image are modified toproduce a final correction factor image. This operation is performed toprevent impulse artifacts. In one embodiment of the present invention, apixel value of the intermediate correction factor image that correspondsto a correct amount of clipping in the initial scale factor image isreplaced by the median pixel value in the 3×3 neighborhood surroundingthe pixel. All pixel values of the intermediate correction factor imagethat correspond to a correct amount of clipping in the initial scalefactor image are similarly replaced to produce the final correctionfactor image 460.

Those skilled in the art will recognize that other suitable techniquesexist to produce a correction factor image 460. For example, an initialscale factor image may be produced at the resolution of the live viewimage 325 and the initial scale factor image may be up-sampled to theresolution of the still image 345 using successive nearest-neighborinterpolation where the maximum-valued neighbor may be used if there areat least two nearest neighbors to properly estimate the underestimatedamounts of clipping in the initial correction factor image.

It is noted that if a pixel is clipped in both the aligned live viewimage 450 and the low-pass still image 420, the exact amount of clippingcannot be estimated properly and therefore only a partial amount ofclipping correction is determined at that pixel location.

The above example for determining the amounts of clipping and therebyproducing a final correction factor image 460 describes a case when thelive view image 325 has an exposure level that is less than that of thestill image 345, wherein the still image 345 has clipped pixels. Asecond example is described next for the case when the still image 345has an exposure level that is less than that of the live view image 325,wherein the live view image 325 has clipped pixels. In this case, theexposure test 510 will determine that E_(L)>E_(S), and executionproceeds to a live view image clipped test 555. The live view imageclipped test 555 checks the pixels of the aligned live view image 450 tosee whether any of the pixels are clipped. If no clipped pixels aredetected, then the produce unity correction factor image step 585 isused to produce a correction factor image 460 where all of the valuesare set to 1.0. If clipped pixels are detected, then a determine meanexposure factor step 560 is executed.

In the determine mean exposure factor step 560, the value ofMeanExposureFactor is obtained by dividing the mean value of the pixelvalues for aligned live view image (E_(L)) by the mean value of thelow-pass still image data (E_(S)). The value of MeanExposureFactor willbe greater than 1.0.

In determine gained still image step 565, the low-pass still image 420is multiplied by MeanExposureFactor, producing a gained still image. Ina determine clipped gained still image step 570, all pixel values of thegained still image that are above the clipped value of the aligned liveview image 450 are set to the clipped value producing a clipped gainedstill image. In a determine clipped still image step 575, the clippedgained still image is then divided by MeanExposureFactor to produce aclipped still image.

In a determine initial correction factor image step 580, each pixelvalue of the clipped still image is divided by the corresponding pixelvalue of the low-pass still image 520 to produce an initial correctionfactor image, wherein the pixel values of the initial correction factorimage are necessarily equal to or less than one. Moreover, a pixel valueof the initial correction factor image is less than one only on aspatial location where the clipped still image has clipped pixels. Thespatial locations where the clipped still image has clipped pixels areassumed to be the spatial locations where the aligned live view image450 has clipped pixels. Therefore, the initial correction factor imageis an estimate of the image that is needed to divide the aligned liveview image 450 to obtain a version of the aligned live view imagewithout clipped pixels, and as such each pixel in the initial correctionimage has a value that corresponds to an estimate of the inverse of theamount of clipping in the aligned live view image 450 at thecorresponding spatial location.

However, it can be shown that the initial correction factor image pixelvalues are correct only on spatial locations that are away from theclipped pixels that represent object edges of a captured scene. Theinitial correction factor image pixels that represent clipped objectedges of a captured scene, or that are near pixels that representclipped object edges of a captured scene, will generally haveoverestimated pixel values. That is, the inverse amount of clipping onor near clipped edges is generally overestimated. In one preferredembodiment of the current invention, it is assumed that any pixels thatdid not exist before the interpolate image step 415 or the interpolateimage step 435 correspond to overestimated inverse amounts of clippingin the initial scale factor image. Furthermore, in the same embodiment,it is assumed that all pixels that existed before the interpolate imagestep 415 or the interpolate image step 435 correspond to correct inverseamounts of clipping in the initial scale factor image.

The refine correction factor image step 545 is used to properly estimatean overestimated pixel value of the initial correction factor image.First, the overestimated pixel value is replaced by the minimum correctinverse amount of clipping value within a neighborhood that contains theoverestimated pixel value. Once a pixel value of the initial correctionfactor image has been properly estimated, it is considered to correspondto a correct inverse amount of clipping.

All overestimated pixel values of the initial correction factor imageare similarly properly estimated to produce an intermediate correctionfactor image. Next, the pixel values of the intermediate correctionfactor image that correspond to correct amounts of clipping in theinitial scale factor image are modified to produce a final correctionfactor image. This operation is performed to prevent impulse artifacts.In one embodiment of the present invention, a pixel value of theintermediate correction factor image that corresponds to a correctamount of clipping in the initial scale factor image is replaced by themedian pixel value in the 3×3 neighborhood surrounding the pixel. Allpixel values of the intermediate correction factor image that correspondto a correct amount of clipping in the initial scale factor image aresimilarly replaced to produce the final correction factor image 460.

Returning now to a discussion of FIG. 4A, the correction factor image460 and the residual image 430 are combined using a correct residualimage step 465 producing a corrected residual image 470. A method forcombining the residual image 430 with the correction factor image 460 toproduce the corrected residual image 470 is to multiply the residualimage 430 by the correction factor image 460. Another method is to clipthe correction factor image 460 to some clipped value, wherein theclipped value represents a maximum allowed correction factor, and thenmultiply the residual image 430 by the clipped correction factor image.Those skilled in the art will recognize that there are other methods ofcombining the residual image 430 with the correction factor image 460 toproduce the corrected residual image 470, including, but not limited to,linearly or non-linearly transforming the correction factor image 460before multiplying it by the residual image 430.

In combine images step 475, the interpolated live view image 440 iscombined with the corrected residual image 470 to form a high-resolutionlive view image 480. One method of combining the interpolated live viewimage 440 with the corrected residual image 470 to produce thehigh-resolution live view image 480 is to add the corrected residualimage 470 to the interpolated live view image 440. Another methodincludes noise-reducing and gaining the corrected residual image 470producing a modified corrected residual image, then adding the modifiedcorrected residual image to the interpolated live view image 440. Thoseskilled in the art will recognize that there are other methods ofcombining an interpolated live view image 440 with a corrected residualimage 470 to produce a high-resolution live view image 480 including,but not limited to, linearly or non-linearly transforming the correctedresidual image 470 before adding the interpolated live view image 440.

Finally, the high dynamic range image 355 is produced using combineimages step 485 by forming a combination of the high-resolution liveview image 480 and the still image 345. In some embodiments, rather thanusing the original still image 345, a reconstructed still image can beformed by combining the low-pass still image 420 and the correctedresidual image 470. In this way, the still image 345 does not have beretained in memory after the corrected residual image 470 has beendetermined.

FIG. 6A describes the combine images step 485 in more detail accordingto a preferred embodiment of the present invention. Inputs to this stepare the still image 345 and the high-resolution live view image 480. Insome embodiments, a reconstructed stilt image can be used in place ofthe still image, where the reconstructed still image is formed bycombining the low-pass still image 420 and the corrected residual image470. Preferably, the reconstructed still image can be formed byperforming the inverse operation to that of the compute residual imagestep 425 in FIGS. 4A and 4B. In a preferred embodiment wherein thelow-pass still image 420 is subtracted from the still image 345 togenerate the residual image 430 in step 425, the corrected residualimage 470 is added to the low-pass still image 420 to produce thereconstructed still image.

First, a linearize images step 615 is applied to process the still image345 and the high-resolution live view image 480 such that they are in alinear exposure metric. That is to say the processed pixel values are ina metric that is proportional to exposure.

To combine the still image 345 and the high-resolution live view image480, it is important to accurately correct for any differences betweenthe exposure level and flare for the two images. To create an estimateof relative exposure level and flare, the following relationship isassumed:

X(x, y)=ExposureFactor·Y(x, y)+FlareDelta   (1)

where X(x,y) are the pixel values of the still image 345, Y(x,y) are thepixel values of the high-resolution live view image 480, and (x, y)refers to the pixel coordinates. ExposureFactor and FlareDelta are twounknown constants which must be determined in order to relate the twoimages. For image data in a linear exposure metric, two images differingonly in exposure level can be related by a multiplicative term asrepresented by ExposureFactor. Remaining differences between the twoimages that are not modeled by a multiplicative term, such asdifferences in flare, can be modeled with an additional offset term, asgiven by FlareDelta.

In general, exposure level differences between two images, and hence theExposureFactor term, can be determined from the camera capture system,however due to variations in the performance of mechanical shutters, andother camera components, there can be a significant difference betweenthe recorded exposure level and the actual exposure level of an image.In a preferred embodiment, the ExposureFactor and FlareDelta constantsare estimated directly from the still image 345 and the high-resolutionlive view image 480 as follows. First, the reconstructed still and thefinal live view images are paxelized using a paxelize images step 620.As is known in the art, paxelization of an image involves combiningmultiple image pixels to form a small image representation (e.g., 12×8paxels). In one embodiment, the image is divided into rectangular groupsof pixels and the average pixel value within each group is calculated.Alternately, the image can be downsized with prefiltering to form smallimage representation.

In a preferred embodiment, the reconstructed still and the final liveview images are CFA data, and the paxelized version of each image isformed using only image data from a single channel. For example, thegreen pixel data can be used in computing the paxelized images.Alternatively, all three channels of Bayer pattern CFA data can be usedto generate luminance values for the paxelized image. In the case thatthe reconstructed still and the final live view images are full colorimages having red, green and blue values at every pixel location, thepaxelized images can be formed using data from a single channel, or bycomputing a luminance channel from the full color image and deriving apaxelized image from the luminance image data.

The paxelized representations of the still image 345 and thehigh-resolution live view image 480 are given as X^(P)(i, j) andY^(P)(i, j), respectively, where (i, j) are paxel coordinates. Thepaxelized images are vectorized and arranged into a two-column dataarray, where each row of the data array contains one still image paxelvalue from X^(P) and the corresponding high-resolution live view paxelvalue from Y^(P).

Next, a remove paxels step 625 is used to remove all rows of data in thedata array that contain clipped paxel values, as well as all rows thatcontain paxel values that are considered to be dominated by noise. Thethreshold used to determine if a paxel value is dominated by noise canbe set based upon noise data for a given population of capture devices.

A regress paxel data step 630 is used to perform a linear regression onthe remaining data in the data array to compute slope and offset values635 relating the data in the first column of the array to the data inthe second column of the array. The slope value represents the exposurelevel scale factor (ExposureFactor); the offset value represents anestimate of global flare difference (FlareDelta).

Next, an adjust live view image step 640 is used to apply the slope andoffset values 635 to the high-resolution live view image 480, forming anadjusted live view image 645. This is accomplished by applying theequation given in Eq. (1). In this way, the exposure values in theadjusted live view image 645 will be consistent with those in the stillimage 345. If an estimate of the overall flare level in the still image345 is available, this value can be subtracted from both the still image345 and the adjusted live view image 645 to produce images havingreduced flare.

Finally, the still image 345 and the adjusted live view image 645 arecombined using a combine images step 650 to form the high-dynamic rangeimage 355. Additional details of the combine images step 650 aredescribed in FIG. 7. The steps shown in this figure are applied to eachpixel of the images. First, a live view pixel clipped test 710 is usedto test whether a particular pixel in the adjusted live view image 645is clipped. If it is not clipped, a still image pixel clipped test 720is used to test whether the corresponding pixel in the still image 345is clipped. If the still image pixel clipped test 720 indicates that thestill image pixel is clipped, then a use adjusted live view pixel valuestep 740 is used to set the corresponding pixel in the high dynamicrange image 355 equal to the pixel value from the adjusted live viewimage 645.

If the still image pixel clipped test 720 indicates that the still imagepixel is non clipped, then a use combined pixel values step 750 is usedto set the corresponding pixel in the high dynamic range image 355 equalto a combination of the pixel values from the still image 345 and theadjusted live view image 645. One method for combining th pixel valuesin the use combined pixel values step 750 is to average the pixel valuesof the still image 345 and the adjusted live view image 645. Anothermethod can be to average weighted pixel values, where the weights are afunction of the pixel values, such as is described by Devebec et al. inthe article “Recovering high dynamic range radiance maps fromphotographs” (SIGGRAPH'97 Conference Proceedings, pp. 369-378, 1997), oras described by Mann in commonly assigned U.S. Pat. No. 5,828,793, or asdescribed by Ikeda in commonly assigned U.S. Pat. No. 6,040,858, whichare incorporated herein by reference.

If the live view pixel clipped test 710 indicates that the pixel in theadjusted live view image 645 is clipped, then a still image pixelclipped test 730 is used to test whether the corresponding pixel in thestill image 345 is clipped. If the still image pixel value is clipped,then the corresponding pixel in the high dynamic range image 355 equalto a clipped pixel value using a set to clipped value step 760. In oneembodiment of the present invention, the clipped pixel value correspondsto the larger of the clipping points in the still image 345 and theadjusted live view image 645.

If the still image pixel clipped test 730 still image pixel value is notclipped, then use still image pixel value step 770 is used to set thecorresponding pixel in the high dynamic range image 355 equal to thepixel value from the still image 345.

Returning to a discussion of FIGS. 3A and 3B, as mentioned above, someembodiments of the present invention involve capturing multiple liveview images 325. If each of the live view images 325 are captured at thesame exposure level, then a single live view image (e.g., the last liveview image that was captured) can be selected for using in the methodcombine images step 350. Alternately, a plurality of the live viewimages can be combined to reduce noise in the live view images. However,care must be taken to account for any global or local motion of thescene between image captures.

If the live view images 325 have been captured at different exposurelevels, then the combine images step 350 can be performed multiple timesusing each of the live view images. For example, consider the case wherea first live view image having a lower exposure level than the stillimage 345 and a second live view image having a higher exposure levelthan the still image 345 are captured. First, the combine images step350 can be executed to combine the still image 345 with the first liveview image producing a first high dynamic range image. Then, the combineimages step 350 can be executed a second time to combine the first highdynamic range image with the second live view image to produce a finalhigh dynamic range image.

In an alternate embodiment, high-resolution live view images 480 can bedetermined corresponding to each of the live view images 325 havingdifferent exposure levels. The combine images step 485 shown in FIG. 6Acan then be modified to determine scale and offset values 635 for eachof the high-resolution live view images 480 and use to form acorresponding set of adjusted live view images 645. The set of adjustedlive view images 645 can be then combined to form a single aggregateadjusted live view image using a method analogous to that shown in FIG.7. The aggregate adjusted live view image can then be combined with thestill image 345 using the combine images step 650. Alternately, thecombine images step 650 can be generalized to combine the still image345 with the set of adjusted live view images 645. In this case, foreach image pixel, the pixel values from the images that are not clippedcan be combined to determine the corresponding pixel value of the highdynamic range image 355.

Once the still image 345 and the live view images 325 have been combinedto form the high dynamic range image 355, it can be optionally renderedto an output space using the render to output space step 360. Forexample, it can be rendered to an sRGB image by means of a tone scaleprocessing operation, such as described in U.S. Pat. No. 7,130,485 byGindele et al., which is incorporated herein by reference. This approachmakes use of the high dynamic range information to form an improvedimage which preserves some of the highlight and shadow detail that wouldnormally be lost when the image is rendered for display on a typicaloutput device. Note that the render to output space step 360 can beskipped if the image is to be displayed on a device inherently capableof handling and displaying a high dynamic range image, or is to bestored in an extended range form for later processing.

FIG. 4B illustrates an alternate method for performing the combineimages step 350 in FIGS. 3A and 3B according to another embodiment ofthe present invention. The inputs to this step are a still image 345 andat least one live view image 325. Where the steps in this steps in thismethod are identical to, or analogous to, corresponding steps in FIG.4A, the same reference numbers have been used.

In reduce resolution step 410, the resolution of the still image 345 isreduced to be the same as the resolution of the live view image 325,producing a representative live view image 412. In align images step445, the live view image 325 is aligned with the representative liveview image 412 to account for motion that may have occurred between thetwo exposures, producing aligned live view image 450. The method ofalignment may be similar to the alignment method described with respectto FIG. 4A.

The representative live view image 412 is subsequently spatiallyinterpolated back to the resolution of the original still image 345using the interpolate image step 415 to generate low-pass still image420.

In compute residual image step 425, the low-pass still image 420 issubtracted from the original still image 345 to generate residual image430. As discussed earlier, if the original still image 345 and low-passstill image 420 are of different sizes, the residual image 430 can bethe same size as the low-pass still image 420, and additionalrows/columns from the original still image 345 can be ignored.Alternatively, the residual image 430 can be the same size as theoriginal still image 345, and the residual image 430 can have valuesequal to the original still image 345 at any locations outside theboundaries of the low-pass still image 420.

In determine correction factor image step 455, correction factor image460 is determined responsive to the aligned live view image 450 and therepresentative live view image 412. In this step, the image having thelesser exposure level is used to determine the amounts of clippingpresent in the image having the greater exposure level to produce thecorrection factor image 460. The method to produce the final correctionfactor image may be similar to the method described with respect to FIG.4A. Any pixels that exist at the still image resolution and that aremissing at the live view resolution should be initialized to having avalue of one. As in the method of FIG. 4A, a correct residual image step465 is used to the correction factor image 460 and the residual image430, producing corrected residual image 470.

A combine images step 490 is used to combined the aligned live viewimage 450 and the representative live view image 412 to produce alow-resolution high dynamic range image 492. FIG. 6B describes thecombine images step 490 in more detail according to a preferredembodiment of the present invention. The steps shown in FIG. 6B areidentical to those described relative to the combine image step 485 inFIG. 6A.

Returning to a discussion of FIG. 4B, the low-resolution high dynamicrange image 492 is interpolated back to the resolution of the (possiblycropped) still image 345 producing an interpolated high dynamic rangeimage 496 using an interpolate image step 494. In a preferredembodiment, the interpolate image step 494 is identical to theinterpolate image step 415.

Finally, the interpolated high dynamic range image 496 and the correctedresidual image 470 are combined using combine images step 485 to producethe high dynamic range image 355. The high dynamic range image 355 willhave the extended dynamic range associated with the interpolated highdynamic range image 496, but will have a resolution and level of imagedetail equivalent to the still image 345. One method to combine theinterpolated high dynamic range image 496 and the corrected residualimage 470 is to add the two images together. In some embodiments,noise-reduction can be applied to the corrected residual image 470before adding it the interpolated high dynamic range image 496. Thoseskilled in the art will recognize that there are other methods ofcombining the interpolated high dynamic range image 496 with a correctedresidual image 470 to produce the high dynamic range image 355including, but not limited to, linearly or non-linearly transforming thecorrected residual image before adding the interpolated live view image.

In a preferred embodiment, the live view image 325 and the still image345 processed according to the methods of FIGS. 4A and 4B are CFAimages. Likewise, the resulting high dynamic range image 355 havingincreased dynamic range is also a CFA image. In this case, thewell-known image processing step of CFA interpolation is performed afterthe high dynamic range image has been produced. Alternatively, CFAinterpolation can be applied to the live view image 325 and the stillimage 345 prior to performing the combine images step 350 according tothe present invention. In this case, the steps of the described methodscan be performed with full color images.

In some embodiments, a local motion estimation or motion detectionmethod is used to identify regions of object motion within the sceneduring the sequence of captured images. Pixels corresponding to objectmotion are identified, and are processed differently in the determinecorrection factor image step 455 (FIGS. 4A and 4B), in the combineimages step 485 (FIG. 4A), and the combine images step 490 (FIG. 4B). Inparticular, since the scene content does not match among the still image345 and the one or more live view images 325 in regions identified ashaving object motion, the live view images 325 are not used to improvethe dynamic range of the still image 345 in those regions. Methods ofmotion detection are well-known to those of skill in the art, and anysuitable method can be applied to detect moving regions in the still andlive view images.

The invention has been described in detail with particular reference tocertain preferred embodiments thereof, but it will be understood thatvariations and modifications can be effected within the scope of theinvention as described above, and as noted in the appended claims, by aperson of ordinary skill in the art without departing from the scope ofthe invention.

PARTS LIST

-   10 Light-   11 Imaging stage-   12 Lens-   13 Filter block-   14 Iris-   16 Brightness sensor-   18 Shutter-   20 Image sensor-   22 Analog signal processor-   24 A/D converter-   26 Timing generator-   28 Image sensor stage-   30 Bus-   32 DSP memory-   36 Digital signal processor (DSP)-   38 Processing stage-   40 Exposure controller-   50 System controller-   52 Bus-   54 Program memory-   56 System memory-   57 Host interface-   60 Memory card interface-   62 Socket-   64 Memory card-   68 User interface-   70 Viewfinder display-   72 Exposure display-   74 User inputs-   76 Status display-   80 Video encoder-   82 Display controller-   88 Image display-   90 CFA pattern-   310 Push capture button to S1 step-   320 Capture live view images step-   325 Live view image-   330 Push capture button to S2 step-   335 Capture additional live view images step-   340 Capture still image step-   345 Still image-   350 Combine images step-   355 High dynamic range image-   360 Render to output space step-   365 Rendered high dynamic range image-   410 Reduce resolution step-   412 Representative live-view image-   415 Interpolate image step-   420 Low-pass still image-   425 Compute residual image step-   430 Residual image-   435 Interpolate image step-   440 Interpolated live view image-   445 Align images step-   450 Aligned live view images-   455 Determine correction factor image step-   460 Correction factor image-   465 correct residual step-   470 corrected residual image-   475 Combine images step-   480 high-resolution live view image-   485 Combine images step-   490 Combine images step-   492 low-resolution high dynamic range image-   494 Interpolate image-   496 interpolated high dynamic range image-   510 Exposure test-   515 Still image clipped test-   520 determine mean exposure factor step-   525 determine gained live view image step-   530 determined clipped gained live view image step-   535 determined clipped live view image step-   540 determine initial correction factor image step-   545 refine correction factor image step-   555 live view image clipped test-   560 determine mean exposure factor step-   565 determine gained still image step-   570 determine clipped gained still image step-   575 determine clipped still image step 575-   580 determine initial correction factor image step-   585 Determine mean exposure factor step-   615 Linearize images step-   620 Paxelize images step-   625 Remove paxels step-   630 Regress paxel data step-   635 Slope and offset values-   640 Adjust live view image step-   645 Adjusted live view image-   650 Combine images step-   710 Live view pixel clipped test-   720 Still image pixel clipped test-   730 Still image pixel clipped test-   740 use adjusted live view pixel value step-   750 use combined pixel values step 750-   760 set to clipped value step-   770 use still image pixel value step

1. A method for producing a high-dynamic-range image, comprising: a)receiving a low-resolution image of a scene having a first resolutionand captured at a first exposure level; b) receiving a high-resolutionimage of the scene having a second resolution and captured at a secondexposure level different from the first exposure level, the secondresolution being greater than the first resolution; c) using a dataprocessor to form a representative low-resolution image from thehigh-resolution image; d) using a data processor to form a residualimage corresponding to differences between the high-resolution image andthe representative low-resolution image; e) using a data processor toform a low-resolution high-dynamic range image by combining thelow-resolution image and the representative low-resolution image; f)using a data processor to produce the high-dynamic-range image bycombining the low-resolution high-dynamic-range image and the residualimage; and g) storing the high-dynamic-range image in a processoraccessible memory.
 2. The method of claim 1 wherein the low-resolutionimage and the high-resolution image are captured using a digital camera.3. The method of claim 2 wherein the digital camera has a preview modeproviding a live view image stream, and wherein the low-resolution imageis a live view image captured from the live view image stream.
 4. Themethod of claim 1 wherein the first exposure level is less than thesecond exposure level.
 5. The method of claim 1 wherein the firstexposure level is greater than the second exposure level.
 6. The methodof claim 1 wherein step d) includes: i) resizing the representativelow-resolution image to produce a resized representative low-resolutionimage having the same resolution as the high-resolution image, and ii)determining the residual image responsive to a difference between thehigh-resolution image and the resized representative low-resolutionimage.
 7. The method of claim 1 wherein step d) includes: i) determininga low-pass image by applying a low-pass convolution filter to thehigh-resolution image; and ii) determining the residual image responsiveto a difference between the high-resolution image and the low-passimage.
 8. The method of claim 1 wherein step d) includes applying ahigh-pass convolution filter to the high-resolution image, the high-passconvolution filter being designed to provide an estimate of frequencycontent from the high-resolution image that is not included in therepresentative low-resolution image.
 9. The method of claim 1 whereinstep e) includes adding the low-resolution high dynamic range image andthe residual image.
 10. The method of claim 1 wherein step e) includesthe step of modifying the residual image in pixel neighborhoodssurrounding pixels where either the high-resolution image or thelow-resolution image is clipped.
 11. The method of claim 10 wherein theresidual image is modified by multiplying the residual image by acorrection factor, and wherein the correction factor is a function ofthe maximum amount of clipping in the pixel neighborhood.
 12. The methodof claim 1 wherein pixel values for the low-resolutionhigh-dynamic-range image are determined by forming a weightedcombination of corresponding pixel values from the low-resolution imageand the representative low-resolution image.
 13. The method of claim 12wherein weights for the weighted combination vary as a function of pixelvalue in the low-resolution image or the representative low-resolutionimage.
 13. The method of claim 12 wherein any clipped pixels areexcluded from the weighted combination.
 14. The method of claim 1further including using an alignment step to correct for alignmentdifferences between the low-resolution image and the high-resolutionimage.
 15. The method of claim 1 wherein pixel values of thelow-resolution image and the high-resolution image are linear with sceneexposure.
 17. The method of claim 1 wherein the low-resolution image andthe high-resolution image are color filter array images captured with animage sensor having an array of color filters disposed overphoto-sensitive pixels, the array of color filters including at leastthree different types of color filters corresponding to at least threedifferent color channels, and wherein the steps c)-f) are appliedindependently to image pixels corresponding to each of the colorchannels such that the high-dynamic-range image is a color filter arrayhigh-dynamic-range image.
 18. The method of claim 17 further includingapplying a color filter array interpolation algorithm to determine afull color high-dynamic-range image responsive to color filter arrayhigh-dynamic-range image.
 19. The method of claim 1 further includingreceiving a second low-resolution image of the scene having the firstresolution and captured at a third exposure level, the third exposurelevel being different from the first and second exposure levels, andwherein the low-resolution high-dynamic range image is formed responsiveto the second low-resolution image.
 20. The method of claim 19 whereinthe first exposure level is less than the second exposure level and thethird exposure level is greater than the second exposure level.
 21. Adigital camera system for producing high-dynamic-range images,comprising: an image sensor for capturing digital images; an opticalsystem for forming an image of a scene onto the image sensor; a dataprocessing system; a storage memory for storing captured images; and aprogram memory communicatively connected to the data processing systemand storing instructions configured to cause the data processing systemto implement a method for producing high-dynamic range images, whereinthe instructions include: a) receiving a low-resolution image of a scenehaving a first resolution and captured at a first exposure level; b)receiving a high-resolution image of the scene having a secondresolution and captured at a second exposure level different from thefirst exposure level, the second resolution being greater than the firstresolution; c) using a data processor to form a representativelow-resolution image from the high-resolution image; d) using a dataprocessor to form a residual image corresponding to differences betweenthe high-resolution image and the representative low-resolution image;e) using a data processor to form a low-resolution high-dynamic rangeimage by combining the low-resolution image and the representativelow-resolution image; f) using a data processor to produce thehigh-dynamic-range image by combining the low-resolution high dynamicrange image and the residual image; and g) storing thehigh-dynamic-range image in a processor accessible memory.